﻿// -------------------------------------------------------------------------
//    @FileName         :    NFCityMapModule.h
//    @Author           :    Gao.Yi
//    @Date             :    2025-09-15
//    @Email			:    445267987@qq.com
//    @Module           :    NFCityMapModule
//    @Desc             :
//
// -------------------------------------------------------------------------

#pragma once

#include "NFCityDynamicModule.h"
#include "NFComm/NFObjCommon/NFObject.h"
#include "NFLogicCommon/NFMMODynamicModule.h"

namespace proto_ff
{
    class Proto_GCMapMsgReq;
}

class NFCityPlayer;
class NFCityWorldObject;

const uint64_t DEFAULT_ACTOR_SPEED = 60000;

class NFCityMapModule : public NFCityDynamicModule
{
public:
    NFCityMapModule(NFIPluginManager* p);
    ~NFCityMapModule() override;

public:
    int Awake() override;

public:
    int OnHandleClientMessage(NFDataPackage& packet, NFCitySession* pSession, const proto_ff::Proto_CSReq& req) override;
    int OnHandleServerMessage(uint64_t unLinkId, NFDataPackage& packet) override;

public:
    int OnHandleGCMapMsgReq(int64_t unLinkId, NFDataPackage& packet);
    int OnHandleGCEnterMapReq(int iSvrId, int transId, const proto_ff::Proto_GCMapMsgReq& req);

public:
    int OnHandleMapEnterReq(NFDataPackage& packet, NFCitySession* pSession, const proto_ff::Proto_CSReq& req);
    int OnHandleMapLeaveReq(NFDataPackage& packet, NFCitySession* pSession, const proto_ff::Proto_CSReq& req);
    int OnHandleMapPosReq(NFDataPackage& packet, NFCitySession* pSession, const proto_ff::Proto_CSReq& req);
    int OnHandleMapActionReq(NFDataPackage& packet, NFCitySession* pSession, const proto_ff::Proto_CSReq& req);

public:


public:
    int CheckActionObject(NFCityPlayer* pPlayer, NFCityWorldObject* pCtrlWo, uint64_t ullRoleId);
};
